﻿<PageFunction
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:sys="clr-namespace:System;assembly=mscorlib" 
    x:Class="ComicViewer.HomePage"
    x:TypeArguments="sys:String"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="600"
    Title="PageFunction1">
    <Grid Background="#FF1570A6">
        <Grid.RowDefinitions>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0" Orientation="Horizontal">
            <TextBox Name="editKeyword" Width="210" Margin="5,5,0,0" Padding="3" FontSize="11"/>
            <Button Name="btnSearch" Content="查找" Click="btnSearch_Click" Margin="5,5,0,0" Width="70" FontSize="11" />
        </StackPanel>
        <Grid Grid.Row="1" Margin="5,5,5,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="200"/>
                <ColumnDefinition Name="C2" Width="*"/>
            </Grid.ColumnDefinitions>
            <ListBox Name="ListBoxCategories" Grid.Column="0" SelectionChanged="ListBoxCategories_SelectionChanged" Margin="0,0,5,0">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding Name}"/>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
            <ListView Name="ListBoxBooks" Grid.Column="1" BorderThickness="0" SelectionMode="Single" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Background="Transparent">
                <ListView.ItemsPanel>
                    <ItemsPanelTemplate>
                        <WrapPanel Margin="3">
                        </WrapPanel>
                    </ItemsPanelTemplate>
                </ListView.ItemsPanel>
                <ListView.ItemTemplate>
                    <DataTemplate>
                        <Grid>
                            <Border BorderBrush="White" BorderThickness="5" CornerRadius="5">
                                <Button Content="{Binding Name}" Click="Button_Click_1"/>
                            </Border>
                        </Grid>
                    </DataTemplate>
                </ListView.ItemTemplate>
                <!--<ListView.View>
                    <GridView>
                        <GridViewColumn Header="名称">
                            <GridViewColumn.CellTemplate>
                                <DataTemplate>
                                    <Button Content="{Binding Name}" Click="Button_Click_1"/>
                                </DataTemplate>
                            </GridViewColumn.CellTemplate>
                        </GridViewColumn>
                    </GridView>
                </ListView.View>-->
            </ListView>
        </Grid>
    </Grid>
</PageFunction>
